/**
 * Created by nengjian on 2017/5/12.
 */
'use strict';

const path = require('path');
const sendToWormhole = require('stream-wormhole');
var fs = require('fs'),
    pipeline = require("../../../utils/pipeline");

exports.create = function*(ctx) {
    const fileInfo = yield ctx.service.util.files.fileupload("./app/public/fileupload/");
    ctx.body = {
        fileInfo: fileInfo,
        ret_msg: "file upload success!",
        ret_code: "000100",
    };
};

exports.index = function*(ctx) {
    ctx.body = {
        data: "wapi/fileupload new",
        ret_code: "000100",
    };
};